import service from '@/utils/request.js'

// 获取-部门列表 /company/department
export const companyDepartmentRequest = () => {
  return service({
    method: 'GET',
    url: '/company/department'
  })
}

// 部门负责人列表/sys/user/simple
export const getUserSimpleRequest = () => {
  return service({
    method: 'GET',
    url: '/sys/user/simple'
  })
}

// 新增部门 /company/department
export const addDepartmentRequest = data => {
  return service({
    method: 'POST',
    url: '/company/department',
    data
  })
}

// 删除部门详情 /company/department/{id}
export const delCompanyDepartment = (id) => {
  return service({
    method: 'DELETE',
    url: `/company/department/${id}`

  })
}
// 修改-部门详情 /company/department/{id}
export const updateDepartmentRequest = (data) => {
  return service({
    method: 'PUT',
    url: `/company/department/${data.id}`,
    data

  })
}
// 获取部门详情/company/department/{id}
export const getDepartmentDetailRequest = (id) => {
  return service({
    method: 'GET',
    url: `/company/department/${id}`

  })
}

